import request from '@/utils/request'
import { getToken } from '@/utils/auth'
var token = getToken()
//区域列表
export function getregionList(data) {
    return request({
        url: '/api/admin/region',
        method: 'get',
        params:data
    })
}
//电站列表
export function getbaseList() {
    return request({
        url: '/api/admin/region/basestation',
        method: 'get',
    })
}

//添加
export function addto(formData) {
    let newData = JSON.stringify(formData);
    return request({
        url: '/api/admin/region/create',
        method: 'post',
        data: newData
    })
}
//修改
export function update(formData) {
    let newData = JSON.stringify(formData);
    return request({
        url: '/api/admin/region/edit',
        method: 'post',
        data: newData
    })
}